<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>微信支付样例-退款</title>
</head>
<body>
<div style="text-align: center;">
<div style="margin-left: 10px;color:#556B2F;font-size:30px;font-weight: bolder;">扫描支付模式二</div><br/>
<div style="color: red">仅供测试用：金额0.01元</div>
<div style="text-align: center;margin-top: 5px;">
   修改金额：<input id="money" type="text" style="width: 40px;">&nbsp;&nbsp;<input type="button" value="测试" onclick="change()">
</div>
<img alt="模式二扫码支付" id="url" src="http://paysdk.weixin.qq.com/example/qrcode.php?data=<{$url}>" style="width:150px;height:150px;"/>
</div>
<script type="text/javascript" src="__STATIC__/js/lib/jquery/1.9.1/jquery.min.js"></script>
<script>
    function change(){
        $.ajax({
            type:"post",
            data:{money:$("#money").val()},
            dataType:"json",
            url:"<{:url('admin/pay/wxChange')}>",
            success:function(data){
                if(data.code=1){
                    alert("微信二维码生成成功");
                    $("#url").prop("src",data.url);
                }else{
                    alert("微信二维码生成失败!")
                }
            }
        })
    }
</script>
</body>
</html>